{#include main}
{#title}Managed datasources{/title}
{#body}
<table class="table table-striped">
    <thead class="thead-dark">
    <tr>
        <th scope="col">Name</th>
        <th scope="col">Actions</th>
    </tr>
    </thead>
    <tbody>
    {#for liquibaseFactory in info:liquibaseFactories}
    <tr>
        <td>
            {liquibaseFactory.dataSourceName}
        </td>
        <td>
            <div class="btn-group">
                <form method="post" enctype="application/x-www-form-urlencoded">
                    <input type="hidden" name="datasource" value="{liquibaseFactory.dataSourceName}">
                    <input type="hidden" name="operation" value="clean">
                    <input id="clear" type="submit" class="btn btn-primary btn-sm" value="Clean" onclick="return confirm('This will drop all objects (tables, views, procedures, triggers, ...) in the configured schema. Do you want to continue?')" >
                </form>
                &nbsp;
                <form method="post" enctype="application/x-www-form-urlencoded">
                    <input type="hidden" name="datasource" value="{liquibaseFactory.dataSourceName}">
                    <input type="hidden" name="operation" value="migrate">
                    <input id="migrate" type="submit" class="btn btn-primary btn-sm" value="Migrate" >
                </form>
            </div>
        </td>
    {/for}
    </tbody>
</table>
{/body}
{/include}
